// 文章请求模块
import request from '../uilts/request'
// 请求获取文章列表数据
export const getArticles = params => {
        return request({
            method: 'GET',
            url: '/v1_0/articles',
            params
        })
    }
    // 请求获取文章详情数据
export const getArticlebyID = articleId => {
        return request({
            method: 'GET',
            url: `/v1_0/articles/${articleId}`
        })
    }
    // 关注文章用户
export const followUser = target => {
        return request({
            method: 'POST',
            url: '/v1_0/user/followings',
            data: {
                target
            }
        })
    }
    // 取消关注文章用户
export const cancelUser = target => {
    return request({
        method: 'DELETE',
        url: `/v1_0/user/followings/${target}`,
    })
}